#!/bin/bash
set -e

OTOOL=${HOST}-otool INSTALLNAMETOOL=${HOST}-install_name_tool STRIP=${HOST}-strip contrib/macdeploy/macdeployqtplus Umbra.app
mkdir -p dist/.background
install contrib/macdeploy/background.png dist/.background
install contrib/macdeploy/DS_Store dist/.DS_Store
install src/qt/res/icons/shadow.icns dist/.VolumeIcon.icns
cd dist
ln -sf /Applications Applications
cd ..
genisoimage -no-cache-inodes -l -probe -V "Umbra" -no-pad -r -apple -o umbra.tmp.dmg dist
dmg dmg umbra.tmp.dmg umbra.macosx.dmg
